package com.lwq.designpattern.creationalPatterns.builderPattern;

/**
 * @author liwq
 * @description
 * @date 2021/11/28 19:24
 */
public class BenchiBuilder implements Ibuilder {

    private CarProduction production = new CarProduction();

    @Override
    public void buildHead() {
        System.out.println("生产奔驰车头");
        production.setCarHead("生产奔驰车头");
    }

    @Override
    public void buildBody() {
        System.out.println("生产奔驰车身");
        production.setCarBody("生产奔驰车身");

    }

    @Override
    public CarProduction build() {
        System.out.println("车造完了");
        return production;
    }
}
